package com.gjy.sb.mapstruct;

import com.gjy.sb.domain.ApplyDocument;
import com.gjy.sb.mapstruct.vo.ApplyDocumentVo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-08-24 15:51:32
 */
@Mapper(componentModel = "spring")
public interface ApplyDocumentMapping {

    @Mappings({
            @Mapping(source = "documentNo", target = "no"),
            @Mapping(source = "creatorId", target = "ids"),
            @Mapping(source = "creatorName", target = "name"),
            @Mapping(source = "createTime", target = "time")
    })
    ApplyDocumentVo applyDocumentApplyDocumentVo(ApplyDocument value);

    @InheritInverseConfiguration(name = "applyDocumentApplyDocumentVo")
    ApplyDocument applyDocumentVo2ApplyDocument(ApplyDocumentVo value);

    List<ApplyDocumentVo> applyDocumentList2ApplyDocumentVoList(List<ApplyDocument> list);

}
